import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import { fileURLToPath, URL } from 'node:url'

// https://vitejs.dev/config/
export default defineConfig({
  base: "./",
  plugins: [vue()],
  server: {
    port: 5173,
    proxy:{
      '/xrpa': {
        target: 'http://localhost:8182',
        changeOrigin: true,
        // rewrite: (path) => path.replace(/^\/xrpa/, '/xrpa'),
      }
    }
  },
  envDir: "./env",
  resolve: {
    alias: {
      '@': fileURLToPath(new URL('./src', import.meta.url))
    }
  }
})
